package com.zhangjie.serviceorder.remote;

import com.zhangjie.internalcommon.dto.PriceRule;
import com.zhangjie.internalcommon.dto.ResponseResult;
import com.zhangjie.internalcommon.request.ForecastPriceDTO;
import com.zhangjie.internalcommon.request.PriceRuleIsNewRequest;
import com.zhangjie.internalcommon.response.ForecastPriceResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Auther: zj
 * @Date: 2024/2/16 - 02 - 16 - 16:01
 * @Description: com.zhangjie.apipassenger.remote
 * @version: 1.0
 */
@FeignClient("service-price")
public interface ServicePriceClient {

    @RequestMapping(method = RequestMethod.POST, value = "/price-rule/is-new")
    public ResponseResult<Boolean> isNew(@RequestBody PriceRuleIsNewRequest priceRuleIsNewRequest);

    @RequestMapping(method = RequestMethod.GET, value = "/price-rule/if-exists")
    public ResponseResult<Boolean> ifPriceExists(@RequestBody PriceRule priceRule);

    @RequestMapping(method = RequestMethod.POST, value = "/calculate-price")
    public ResponseResult<Double> calculatePrice(@RequestParam Integer distance , @RequestParam Integer duration, @RequestParam String cityCode, @RequestParam String vehicleType);

}
